package com.building18.service.impl;

import com.building18.mapper.OwnerMapper;
import com.building18.pojo.Owner;
import com.building18.pojo.vo.OwnerVO;
import com.building18.service.OwnerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OwnerServiceImpl implements OwnerService {

    @Autowired
    private OwnerMapper ownerMapper;

    @Override
    public List<Owner> selectOwner() {
        return ownerMapper.selectOwner();
    }

    @Override
    public Integer deleteOwnerById(Integer id) {
        return ownerMapper.deleteOwnerById(id);
    }

    @Override
    public Integer addOwner(Owner owner) {
        return ownerMapper.addOwner(owner);
    }

    @Override
    public Integer updateOwner(Owner owner) {
        return ownerMapper.updateOwner(owner);
    }

    @Override
    public List<Owner> selectOwnerByName(String name) {
        return ownerMapper.selectOwnerByName(name);
    }

    @Override
    public Integer deleteOwnerByIds(Integer[] ids) {
        return ownerMapper.deleteOwnerByIds(ids);
    }

    @Override
    public List<OwnerVO> getOwnerNameAndId() {
        return ownerMapper.getOwnerNameAndId();
    }

    @Override
    public OwnerVO getOwnerById(Integer id) {
        return ownerMapper.getOwnerById(id);
    }
}